<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>兔子帮管理后台</title>
<link rel="stylesheet" type="text/css" href="/static/style/admin/login.css"/>
<script type="text/javascript" src="/static/js/jquery-1.2.6.min.js"></script>
<script src="/static/js/jquery.validate.min.js" type="text/javascript"></script>
<body>
<script language="JavaScript">
    if(self.parent.frames.length != 0) {
        self.parent.location=document.location;
    }

    $().ready(function() {
        $("#loginform").validate({
            rules: {
                formhash:{required:true},
                username:{required:true},
                password:{required:true}
            },
            messages: {
               formhash:{required:"请输入验证码"},
                username:{required:"请填写用户名"},
               password:{required:"请填写密码"}
            }
        });


		$.ajax({
			success: function(response){
				$('#formhash').val(response);
			},
			url: "<?php echo url('/getformhash'); ?>",
			type: "get"
		});

        $('#username').focus();

    });
</script>

<table class="logintb">
  <tr>
    <td class="login"><h1>兔子帮管理后台</h1>
        <p>分享美丽 加入兔子帮</p>
      <p>&nbsp;</p>
    </td>
    <td><form method="post" name="loginform" id="loginform" action="">
        <p class="logintitle">用户名: </p>
        <p class="loginform">
          <input name="username" tabindex="1" type="text" class="txt" id="username" />
        </p>
        <p class="logintitle">密　码:</p>
        <p class="loginform">
          <input name="password" tabindex="2" type="password" class="txt" id="password" />
        </p>
        <p class="loginnofloat">
          <input name="submit" value="登录"  tabindex="3" type="submit" class="btn" />
        </p>
         <input name="formhash" id="formhash" type="hidden" />
      </form>
    </td>
  </tr>
  <tr>
    <td colspan="2" class="footer"><div class="copyright">
        <p>Powered by <a href="http://www.webpy.org" target="_blank">Tornado+mongodb</a></p>
        <p> &copy; 2011, <a href="http://www.tuzibang.net/" target="_blank">兔子帮</a></p>
      </div></td>
  </tr>
</table>

</body>
</html>


